import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;


public class SocketSender {

    public static void main(String[] args) throws IOException {
	InetAddress receiverAddress = InetAddress.getLocalHost();
	
	DatagramSocket socketS = new DatagramSocket(5001);
	
	byte[] bufferS = "0123456789".getBytes();
	
	DatagramPacket packetS = new DatagramPacket(bufferS, bufferS.length, receiverAddress, 5000);
	
	socketS.send(packetS);

	System.out.println("Packet sent.");
    }
}
